<style>
    input{
        border-radius: 10px!important;
    }
    ul.bar_tabs{position:relative;}
</style>

<div class="row" style="margin-top: -40px;">
    <div class="col-xs-12">
        <div class="" role="tabpanel" data-example-id="togglable-tabs">
            <ul id="tab_list" class="nav nav-tabs bar_tabs" role="tablist">
                <li role="presentation" class="active">
                    <a href="#tab_content_basic" role="tab" id="tab_basic" data-toggle="tab" aria-expanded="true">
                        基本参数
                    </a>
                </li>
                <li role="presentation" class="">
                    <a href="#tab_content_extra" role="tab" id="tab_extra" data-toggle="tab" aria-expanded="false">
                        附加参数
                    </a>
                </li>
            </ul>
            <form class="form-horizontal" id="add-form" action="">
                <div id="tab_content_list" class="tab-content">
                    <div role="tabpanel" class="tab-pane fade active in" id="tab_content_basic" aria-labelledby="tab_basic">
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                网站名称：
                            </label>
                            <div class="col-xs-6">
                                <input name="web_name" type="text" class="form-control" placeholder="例如：全民共享" value="{$data.web_name|default=''}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                虚拟预约数量：
                            </label>
                            <div class="col-xs-6">
                                <input name="apply_num" type="text" class="form-control" placeholder="虚拟预约数量" value="{$data.apply_num|default='100'}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                注册赠送共享豆：
                            </label>
                            <div class="col-xs-6">
                                <input name="register_score" type="number" class="form-control" min="0" value="{$data.register_score|default=0}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                激活会员需要共享豆：
                            </label>
                            <div class="col-xs-6">
                                <input name="transpoint" type="number" class="form-control" min="0" value="{$data.transpoint|default=0}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                注册间隔最短秒数：
                            </label>
                            <div class="col-xs-6">
                                <input name="recentlysecond" type="number" class="form-control" min="0" value="{$data.recentlysecond|default=0}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                短信开关：
                            </label>
                            <div class="col-xs-6">
                                <label class="checkbox-inline"> <input type="radio" name="smsmy_on" value="1" {if !isset($data.smsmy_on) || $data.smsmy_on eq 1} checked{/if}> 开启</label>
                                <label class="checkbox-inline"> <input type="radio" name="smsmy_on" value="2" {if isset($data.smsmy_on) && $data.smsmy_on eq 2} checked{/if}> 关闭</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                注册短信验证码：
                            </label>
                            <div class="col-xs-6">
                                <input name="smsnewcode" type="text" class="form-control" min="0" value="{$data.smsnewcode|default=000000}" required/>
                                6位纯数字，最小000000,最大999999，这个的目的是防止频繁发送验证码，直接输入可以跳过验证码验证
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                首页加载中秒数：
                            </label>
                            <div class="col-xs-6">
                                <input name="load_time" type="number" class="form-control" min="0" value="{$data.load_time|default=1}" required/>
                                单位：毫秒，1秒=1000毫秒
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                收款码一键替换：
                            </label>
                            <div class="col-xs-6">
                                <label class="checkbox-inline"> <input type="radio" name="paycode" value="1" {if !isset($data.paycode) || $data.paycode eq 1} checked{/if}> 关闭</label>
                                <label class="checkbox-inline"> <input type="radio" name="paycode" value="2" {if isset($data.paycode) && $data.paycode eq 2} checked{/if}> 开始</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                支付宝收款码：
                            </label>
                            <div class="col-xs-6">
                                {include file="public/singleImageUploader" uploader-name="alipaytpic"}
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                微信收款码：
                            </label>
                            <div class="col-xs-6">
                                {include file="public/singleImageUploader" uploader-name="wechatpic"}
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                网站底部版权：
                            </label>
                            <div class="col-xs-6">
                                <input name="copyright" type="text" class="form-control" value="{$data.copyright|default=''}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                网站开关：
                            </label>
                            <div class="col-xs-6">
                                <label class="checkbox-inline"> <input type="radio" name="site_on" value="1" {if !isset($data.site_on) || $data.site_on eq 1} checked{/if}> 开启</label>
                                <label class="checkbox-inline"> <input type="radio" name="site_on" value="2" {if isset($data.site_on) && $data.site_on eq 2} checked{/if}> 关闭</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                网站关闭提示：
                            </label>
                            <div class="col-xs-6">
                                <input name="site_info" type="text" class="form-control" value="{$data.site_info|default='网站维护中。。。'}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                注册后跳转下载地址：
                            </label>
                            <div class="col-xs-6">
                                <input name="downloadurl" type="text" class="form-control" value="{$data.downloadurl|default=''}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                网站logo：
                            </label>
                            <div class="col-xs-6">
                                {include file="public/singleImageUploader" uploader-name="logo"}
                            </div>
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="tab_content_extra" aria-labelledby="tab_extra">

                        <div class="form-group" style="display: none;">
                            <label class="control-label col-xs-2">
                                交易中心求购最低数量：
                            </label>
                            <div class="col-xs-6">
                                <input name="qiugou" type="number" min="0" class="form-control" value="{$data.qiugou|default=0}" required/>
                                交易中心最低求购数量
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                单次抽奖消耗SCB数量：
                            </label>
                            <div class="col-xs-6">
                                <input name="lottery" type="number" min="0" class="form-control" value="{$data.lottery|default=0}" required/>
                                单次抽奖消耗SCB数量
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                推广收益起售金额：
                            </label>
                            <div class="col-xs-6">
                                <input name="recommendprice" type="number" min="0" class="form-control" value="{$data.recommendprice|default=0}" required/>
                                推广收益出售的最低起售金额，纯数字，不要有空格等
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                一级收益：
                            </label>
                            <div class="col-xs-6">
                                <input name="parent_first" type="number" min="0" class="form-control" value="{$data.parent_first|default=0}" required/>
                                一级上级拿收益百分比，纯数字，不要有空格等
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                二级收益：
                            </label>
                            <div class="col-xs-6">
                                <input name="parent_second" type="number" min="0" class="form-control" value="{$data.parent_second|default=0}" required/>
                                二级上级拿收益百分比，纯数字，不要有空格等
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                三级收益：
                            </label>
                            <div class="col-xs-6">
                                <input name="parent_third" type="number" min="0" class="form-control" value="{$data.parent_third|default=0}" required/>
                                三级上级拿收益百分比，纯数字，不要有空格等
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                团队奖出售比例：
                            </label>
                            <div class="col-xs-6">
                                <input name="atc_rate" type="text" class="form-control" value="{$data.atc_rate|default=0}" required/>
                                如果写0.1，表示1元团队奖可以当0.1元用。如果写1，表示1元团队奖可以当1元用
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                团队奖出售区间：
                            </label>
                            <div class="col-xs-6">
                                <input name="atc_start" type="text" class="form-control" value="{$data.atc_start|default=0}" required style="width: 150px!important; display: inline-block"/>~
                                <input name="atc_end" type="text" class="form-control" value="{$data.atc_end|default=0}" required style="width: 150px!important; display: inline-block"/>
                                这里指的是团队奖的出售区间
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                配对成功后付款时间：
                            </label>
                            <div class="col-xs-6">
                                <input name="pay_limit_time" type="number" min="0" class="form-control" value="{$data.pay_limit_time|default=0}" required/>
                                配对成功后，超过多少分钟后无法付款
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                付款后对方确认时间：
                            </label>
                            <div class="col-xs-6">
                                <input name="sure_limit_time" type="number" min="0" class="form-control" value="{$data.sure_limit_time|default=0}" required/>
                                买方付款后，超过多少分钟后自动确认收款
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                全站开放购买：
                            </label>
                            <div class="col-xs-6">
                                <label class="checkbox-inline"> <input type="radio" name="site_pro_all" value="1" {if !isset($data.site_pro_all) || $data.site_pro_all eq 1} checked{/if}> 开启</label>
                                <label class="checkbox-inline"> <input type="radio" name="site_pro_all" value="2" {if isset($data.site_pro_all) && $data.site_pro_all eq 2} checked{/if}> 关闭</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                全站关闭购买提示：
                            </label>
                            <div class="col-xs-6">
                                <input name="site_pro_info" type="text" class="form-control" value="{$data.site_pro_info|default='商品无货'}" required/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">
                                系统收款二维码：
                            </label>
                            <div class="col-xs-6">
                                {include file="public/singleImageUploader" uploader-name="pay_code"}
                            </div>
                        </div>
                    </div>
                </div>
                <div style="padding-top: 150px;" class="form-group">
                    <div class="col-xs-offset-2 col-xs-3">
                        <button type="submit" class="btn btn-success">
                            提交
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="__PUBLIC__/vendors/jquery.validation/jquery.validate.min.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/additional-methods.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/messages_zh.min.js"></script>
<script>
    $(function () {
        /*验证*/
        $("#add-form").validate({
            submitHandler: function () {
                ajaxSubmit('add-form', true);
            }
        });
    })

</script>
